LIBS = -lGL -lglut 
CCFLAGS = -O2 -Wall
CC = g++
OUT = 2d

$(OUT): 2d.o data.o ising.o utils.o
	$(CC) $(LIBS)$(CCFLAGS) 2d.o data.o ising.o utils.o -o $(OUT)

2d.o : 2d.cpp data.h ising.h utils.cpp
	$(CC) $(CCFLAGS) -c 2d.cpp

data.o : data.cpp utils.cpp
	$(CC) $(CCFLAGS) -c data.cpp

ising.o : ising.cpp ising.h utils.cpp
	$(CC) $(CCFLAGS) -c ising.cpp

utils.o : utils.cpp
	$(CC) $(CCFLAGS) -c utils.cpp

clean :
	rm -rf *.o $(OUT)
